﻿using Microsoft.EntityFrameworkCore;
using Rabbit.Domain;
using Rabbit.Domain.Cultivation;
using Rabbit.Domain.Processing;
using Rabbit.Domain.Slaughter;

namespace Rabbit.Repository
{
    public class RabbitDbContext:DbContext
    {

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer(
                "Server=182.92.209.50,1433;Database=Rabbit;User Id=sa;Password=sql@123456;",
                options => options.EnableRetryOnFailure()
            );
        }

        public RabbitDbContext(DbContextOptions<RabbitDbContext> dbContextOptions) : base(dbContextOptions) { }
        /// <summary>
        /// 溯源管理
        /// </summary>
        public DbSet<TraceManage> TraceManage { get; set; }
        /// <summary>
        /// 商品表
        /// </summary>
        public DbSet<Goods> Goods { get; set; }
        /// <summary>
        /// 图片表
        /// </summary>
        public DbSet<Imgaes> Imgaes { get; set; }
        /// <summary>
        /// 养殖信息
        /// </summary>
        public DbSet<CultivationInfo> CultivationInfo { get; set; }
        /// <summary>
        /// 保健信息
        /// </summary>
        public DbSet<Immune> Immune { get; set; }
        /// <summary>
        /// 动检证
        /// </summary>
        public DbSet<Dynamic> Dynamic { get; set; }
        /// <summary>
        /// 企业信息
        /// </summary>
        public DbSet<Enterprise> Enterprise { get; set; }
        /// <summary>
        /// 企业照片
        /// </summary>
        public DbSet<EnterpriseImg> EnterpriseImg { get; set; }
        /// <summary>
        /// 屠宰相关照片
        /// </summary>
        public DbSet<SlaughterImg> SlaughterImg { get; set; }
        /// <summary>
        /// 屠宰信息
        /// </summary>
        public DbSet<SlaughterInfo> SlaughterInfo { get; set; }
        /// <summary>
        /// 屠宰企业信息
        /// </summary>
        public DbSet<SlaughterQY> SlaughterQY { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public DbSet<Province> Province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public DbSet<City> City { get; set; }
        /// <summary>
        /// 县
        /// </summary>
        public DbSet<County> County { get; set; }
        /// <summary>
        /// 县
        /// </summary>
        public DbSet<ProcessingImg> ProcessingImg { get; set; }
        /// <summary>
        /// 县
        /// </summary>
        public DbSet<ProcessingInfo> ProcessingInfo { get; set; }
        /// <summary>
        /// 县
        /// </summary>
        public DbSet<ProcessingQY> ProcessingQY { get; set; }




    }
}